package com.lanou.bookstore.book.service;


import com.lanou.bookstore.book.dao.BookDao;
import com.lanou.bookstore.book.domain.Book;

import java.util.List;

public class BookService {

    private BookDao bookDao = new BookDao();

    //查询所有图书
    public List<Book> findAll() {
            List<Book> books = bookDao.findAll();
            return books;
    }

    public List<Book> findByCategory(int cid) {
            List<Book> books = bookDao.findBycategory(cid);
            return books;
    }

    public Book load(String bid) {

            Book book = bookDao.load(bid);
            return book;

    }

}
